<!--#include virtual="/dzps/p1.asp"-->
<%
  s1 "select id,department,[local],machineNo,equipmentTypeId,ipadr from equipment where [ID]={id}"
  s1 "select typ from equipmentType where id={equipmentTypeId}"
  s1 "select name1 from baseinfo where id={typ}"
%>
<!DOCTYPE html>
<html>
<head>
<%easp.include "h.asp"%>
</head>
<body>
  <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin" style="padding: 20px 0 0 0;">
<%
	dim equipmentTypeId
	i_h "id",val("id")
    if val("typ")="" then
		s1 "select id as typ from baseinfo where mode='设备类型'"
	end if
    echo myopt("typ","设备类型",sql2arr("select id,name1 from baseinfo where mode='设备类型' "),val("typ"))
	echo js2("input1.html","local","地点",val("local"),"required")
	if val("name1")<>"科室" then
		echo js2("input1.html","department","病区",val("department"),"required")
		echo js2("input1.html","machineNo","机器号",val("machineNo"),"required")
		echo js2("input1.html","ipadr","ip地址",val("ipadr"),"required")
		equipmentTypeId="型号"
	else
		equipmentTypeId="科室"
	end if
	echo myopt("equipmentTypeId",equipmentTypeId,sql2arr("select id,equipmentName from equipmentType where typ={typ}"),iif(val("equipmentTypeId") = "",0,val("equipmentTypeId")))
%>
    <div class="layui-form-item layui-hide">
      <input type="button" lay-submit lay-filter="LAY-user-front-submit" id="LAY-user-front-submit" value="确认">
    </div>
  </div>
  <script src="/<%=rootpath%>/src/layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '/<%=rootpath%>/src/layuiadmin/' 
  }).extend({
    index: 'lib/index' 
  }).use(['index', 'set','form', 'upload','user'],function(){
    var $ = layui.$
    ,setter = layui.setter
    ,admin = layui.admin
    ,form = layui.form;  
  
    $('#sel_typ').attr('disabled', 'disabled');
	form.render('select'); 
  });
  </script>  
</body>
</html>